using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Manaddiction
{
    /// <summary>
    /// 通用游戏设置，包含初始属性、卡组限制、场景和AI等级等
    /// </summary>

    // 创建Asset菜单项
    [CreateAssetMenu(fileName = "GameplayData", menuName = "TcgEngine/GameplayData", order = 0)]
    public class GameplayData : ScriptableObject
    {
        // ========== 游戏核心设置 ==========
        [Header("Gameplay")]
        public int hp_start = 20;           // 初始生命值
        public int mana_start = 1;          // 初始法力值
        public int mana_max = 10;           // 法力值上限
        public int cards_start = 5;         // 初始手牌数量
        public int cards_max = 7;          // 手牌数量上限
        public float turn_duration = 30f;   // 每回合持续时间(秒)
        //public CardData second_bonus;       // 第二玩家补偿卡牌(先手补偿)

        // ========== 卡组构建规则 ==========
        [Header("Deckbuilding")]
        public int deck_size = 20;          // 卡组标准大小
        public int deck_duplicate_max = 2;  // 同名卡牌最大数量限制

        /// <summary>
        /// 获取游戏数据单例(通过DataLoader)
        /// </summary>
        public static GameplayData Get()
        {
            return DataLoader.Get().data;
        }
    }
}